package com.aiiter.house.service.impl;

import java.util.List;

import com.aiiter.house.domain.HouseContract;
import com.aiiter.house.mapper.HouseContractMapper;
import com.aiiter.house.service.IHouseContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 房间合同Service业务层处理
 *
 * @author ruoyi
 * @date 2024-09-22
 */
@Service
public class HouseContractServiceImpl implements IHouseContractService
{
    @Autowired
    private HouseContractMapper houseContractMapper;

    /**
     * 查询房间合同
     *
     * @param contractId 房间合同主键
     * @return 房间合同
     */
    @Override
    public HouseContract selectHouseContractByContractId(Long contractId)
    {
        return houseContractMapper.selectHouseContractByContractId(contractId);
    }

    /**
     * 查询房间合同列表
     *
     * @param houseContract 房间合同
     * @return 房间合同
     */
    @Override
    public List<HouseContract> selectHouseContractList(HouseContract houseContract)
    {
        return houseContractMapper.selectHouseContractList(houseContract);
    }

    /**
     * 新增房间合同
     *
     * @param houseContract 房间合同
     * @return 结果
     */
    @Override
    public int insertHouseContract(HouseContract houseContract)
    {
        return houseContractMapper.insertHouseContract(houseContract);
    }

    /**
     * 修改房间合同
     *
     * @param houseContract 房间合同
     * @return 结果
     */
    @Override
    public int updateHouseContract(HouseContract houseContract)
    {
        return houseContractMapper.updateHouseContract(houseContract);
    }

    /**
     * 批量删除房间合同
     *
     * @param contractIds 需要删除的房间合同主键
     * @return 结果
     */
    @Override
    public int deleteHouseContractByContractIds(Long[] contractIds)
    {
        return houseContractMapper.deleteHouseContractByContractIds(contractIds);
    }

    /**
     * 删除房间合同信息
     *
     * @param contractId 房间合同主键
     * @return 结果
     */
    @Override
    public int deleteHouseContractByContractId(Long contractId)
    {
        return houseContractMapper.deleteHouseContractByContractId(contractId);
    }
}
